package com.neusoft.neuiotms.dcam.workflow.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.neuiotms.dcam.workflow.model.RukuKJ;

public interface RukuKJRepository extends JpaRepository<RukuKJ, Long> {

    RukuKJ findByTaskId(String taskId);

    RukuKJ findByWorkOrderNumAndTaskId(String workOrderNum, String taskId);

    List<RukuKJ> findByWorkOrderNum(String workOrderNum);

    List<RukuKJ> findAllByWorkOrderNumOrderByCreateTimeDesc(String workOrderNum);

    RukuKJ findTopByWorkOrderNumOrderByCreateTimeDesc(String workOrderNum);

    RukuKJ findTopByWorkOrderNumOrderByIdDesc(String workOrderNum);
}
